DO NOT MERGE: Implement new "ip flag" and "tcp flag" primitives.#1621
DO NOT MERGE: Implement new "ip flag" and "tcp flag" primitives.#1621infrastation wants to merge 1 commit intothe-tcpdump-group:masterfrom
Conversation
|
One problem with this revision is that the |
69f6aad to
60afb2b
Compare
|
This revision gets |
In the scanner define a new "flag" token and in the parser make it a new non-directional type qualifier, Q_FLAG. In gencode.c introduce a generic structure to declare flag states and through gen_scode() delegate Q_FLAG to a new function, gen_flag(). In the latter transcribe flag states for IPv4 and TCP, validate the provided proto qualifier and the ID and dispatch the request to one of the other new functions, gen_ip_flag() and gen_tcp_flag(). Document the new primitives in pcap-filter(7). Add tests to cover the new code paths. The new "afs.pcap" file comprises packets 124~133 from afs.pcap in tcpdump tests.
60afb2b to
abd25f2
Compare
|
Rebased on the current master branch. This revision uses C99 types in the new code, keeps all packet data loads 8-bit, replaces more code with declarations and matches TCP flags using the same style as in This still requires minor corrections in the man page before merging, but otherwise looks nearly ready. |
|
I dont like very much |
|
My message to tcpdump-workers on February 6th among other things explains the choice of string IDs. Because this will have to be fixed and maintained long-term, the design choices should be recorded long-term, so the mailing list is the best place to discuss the syntax. Please make a better suggestion there if you can. |
This is one of the potential solutions discussed on tcpdump-workers in November 2025 instead of the changes in pull request #1210. Needs some feedback.